package com.ruoyi.zcxt.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zcxt.mapper.ZcInfoMapper;
import com.ruoyi.zcxt.domain.ZcInfo;
import com.ruoyi.zcxt.service.IZcInfoService;

/**
 * 资产信息Service业务层处理
 * 
 * @author fish
 * @date 2024-01-12
 */
@Service
public class ZcInfoServiceImpl implements IZcInfoService 
{
    @Autowired
    private ZcInfoMapper zcInfoMapper;

    /**
     * 查询资产信息
     * 
     * @param id 资产信息主键
     * @return 资产信息
     */
    @Override
    public ZcInfo selectZcInfoById(Long id)
    {
        return zcInfoMapper.selectZcInfoById(id);
    }

    /**
     * 查询资产信息列表
     * 
     * @param zcInfo 资产信息
     * @return 资产信息
     */
    @Override
    public List<ZcInfo> selectZcInfoList(ZcInfo zcInfo)
    {
        return zcInfoMapper.selectZcInfoList(zcInfo);
    }

    /**
     * 新增资产信息
     * 
     * @param zcInfo 资产信息
     * @return 结果
     */
    @Override
    public int insertZcInfo(ZcInfo zcInfo)
    {
        zcInfo.setCreateTime(DateUtils.getNowDate());
        return zcInfoMapper.insertZcInfo(zcInfo);
    }

    /**
     * 修改资产信息
     * 
     * @param zcInfo 资产信息
     * @return 结果
     */
    @Override
    public int updateZcInfo(ZcInfo zcInfo)
    {
        zcInfo.setUpdateTime(DateUtils.getNowDate());
        return zcInfoMapper.updateZcInfo(zcInfo);
    }

    /**
     * 批量删除资产信息
     * 
     * @param ids 需要删除的资产信息主键
     * @return 结果
     */
    @Override
    public int deleteZcInfoByIds(Long[] ids)
    {
        return zcInfoMapper.deleteZcInfoByIds(ids);
    }

    /**
     * 删除资产信息信息
     * 
     * @param id 资产信息主键
     * @return 结果
     */
    @Override
    public int deleteZcInfoById(Long id)
    {
        return zcInfoMapper.deleteZcInfoById(id);
    }
}
